package liczba;

import junit.framework.TestCase;

public class LiczbaTest extends TestCase {

	Liczba mala = null;
	Liczba duza = null;

	public void setUp() throws Exception 
	{
		duza = new Liczba(1234567);
		mala = new Liczba(4);
	}

	public void test2() 
	{
		String str = duza.zamiana(2);
		assertEquals(str, "100101101011010000111");
	}

	public void test3() 
	{
		String str = duza.zamiana(3);
		assertEquals(str, "2022201111201");
	}
	
	public void test16() 
	{
		String str = duza.zamiana(16);
		assertNotNull(str, "12D687");
	}
	
	public void test17()
	{
		String str = duza.zamiana(17);
		assertNull(str);
	}
	
	public void malatest2()
	{
		String str = mala.zamiana(2);
		
		assertSame(Integer.valueOf(str), Integer.valueOf(100));
	}
	
	public void malatest3()
	{
		String str = mala.zamiana(3);
		
		assertNotSame(Integer.valueOf(str), Integer.valueOf(011));
	}

}
